//package com.xbongbong.paas.gateway.manager.feign;
//
//import org.springframework.beans.config.ObjectProvider;
//import org.springframework.boot.SpringBootConfiguration;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.context.annotation.Bean;
//import org.springframework.http.converter.HttpMessageConverter;
//
//import java.util.stream.Collectors;
//
//@SpringBootConfiguration
//public class FeignConfig {
//
//    /**
//     * gateway使用feign请求的时候报HttpMessageConverters未注入异常,
//     * 自行配置一个HttpMessageConverters, 避免该异常
//     */
//    @Bean
//    @ConditionalOnMissingBean
//    public HttpMessageConverters messageConverters(ObjectProvider<HttpMessageConverter<?>> converters) {
//        return new HttpMessageConverters(converters.orderedStream().collect(Collectors.toList()));
//    }
//}